package us.feng.tinyspring.aop.aspectj;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class SystemService1 {
	private Map<String, String> loginMap=new ConcurrentHashMap<>();
	public void init(){
		System.out.println("init");
	}
	
	public boolean login(String name,String password){
		if(loginMap.containsKey(name)){
			return false;
		}
		loginMap.put(name, password);
		return true;
	}
	
	public boolean logout(String name){
		if(loginMap.containsKey(name)){
			loginMap.remove(name);
			return true;
		}
		return false;
	}
}
